package com.woniuxy.consumer.mapper;

import com.woniuxy.commons.entity.UserDetails;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author author
 * @create 2021-11-12 17:15
 */
public interface UserdetailsMapper {

    void addUser(UserDetails userDetails);

    //分页查询：查询所有用户和用户详情表单
     List<UserDetails> selectUserDetailsByPage(@Param("userDetails") UserDetails userDetails, @Param("pageIndex") int pageIndex,
                                               @Param("pageSize") int pageSize);
    //分页查询数据条数 查询所有用户和用户详情表单
     int selectCountUserDetailsByPage(@Param("userDetails") UserDetails userDetails);

     //删除
    boolean deleteByUid(String uid);

    //根据uid查询表中数据
    @Select("select * from userdetails where uid=#{uid}")
    UserDetails getUserByUid(String uid);

}
